<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    


    <script>


        function Parent(name,age,graduate,major){
            this.name = name
            this.age = age
            this.graduate = graduate
            this.major = major
        }
    //   Parent('邬学发',24,'武汉纺织大学','建筑环境与能源应用工程')
        
            Parent.prototype.showMe = function(){
            console.log('我的名字是:'+ this.name + '我的年龄是：' + this.age +'我的大学是：'+ this.graduate + '我的专业是：'+ this.major);
            
        }

        new Parent('邬学发',24,'武汉纺织大学','建筑环境与能源应用工程').showMe()
        
    </script>
</body>
</html>